package br.ufal.ic.fracao.especialist.inference;

import br.ufal.ic.fracao.especialist.domain.Item;
import java.util.ArrayList;
import java.util.List;

public class Node {
    
    private List<Node> nodes;
    private Item item;
    
    public Node() {
        nodes = new ArrayList<Node>();
        item = new Item();
    }
    
    public void addChildren(Node _node)  {
        nodes.add(_node);
    }
    
    public void addItem(Item _item) {
        item = _item;
    }
    
    public Item getItem() {
        return item;
    }
    
    public Node getChildren(int index) {
        return nodes.get(index);
    }
    
    public int getNumberOfChildrens() {
        return nodes.size();
    }
}
